﻿<phone:PhoneApplicationPage 
    x:Class="Studio77.PopBall.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="False">
    <phone:PhoneApplicationPage.Resources>
        <Storyboard x:Name="StoryboardBall1">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="image">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.9" Value="-5">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <ExponentialEase EasingMode="EaseOut"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
                <EasingDoubleKeyFrame KeyTime="0:0:1.8" Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <BackEase EasingMode="EaseOut" Amplitude="0.6"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="StoryboardBall2">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="image1">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1.2" Value="-8">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <PowerEase EasingMode="EaseIn"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
                <EasingDoubleKeyFrame KeyTime="0:0:2.4" Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <BackEase EasingMode="EaseOut" Amplitude="0.5"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="StoryboardBall3">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="image2">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.7" Value="-6">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <QuadraticEase EasingMode="EaseIn"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
                <EasingDoubleKeyFrame KeyTime="0:0:1.5" Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <BackEase EasingMode="EaseOut" Amplitude="0.5"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="StoryboardBall4">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="image3">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1.6" Value="-9">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <QuadraticEase EasingMode="EaseIn"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
                <EasingDoubleKeyFrame KeyTime="0:0:3.5" Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <BackEase EasingMode="EaseOut" Amplitude="0.5"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="StoryboardBall5">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="image4">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="-11">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <BackEase EasingMode="EaseOut" Amplitude="0.1"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
                <EasingDoubleKeyFrame KeyTime="0:0:2" Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <BackEase EasingMode="EaseOut"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Style x:Key="ButtonStyle1" TargetType="Button">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="53*"/>
                                <ColumnDefinition Width="194*"/>
                            </Grid.ColumnDefinitions>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <ColorAnimation Duration="0" To="#FFFFDFA6" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                            <ColorAnimation Duration="0" To="#FFFF8B00" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                            <ColorAnimation Duration="0" To="#FF442A04" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To="0.3" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
                                            <DoubleAnimation Duration="0" To="0.3" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="image" d:IsOptimized="True"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="MouseOver"/>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="FocusStates">
                                    <VisualState x:Name="Focused"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Border x:Name="border" BorderBrush="White" BorderThickness="1" CornerRadius="10" Grid.ColumnSpan="2">
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FF68FF00" Offset="0.07"/>
                                        <GradientStop Color="#FF044421" Offset="1"/>
                                        <GradientStop Color="#FFDCFFDD"/>
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                            <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Grid.Column="1"/>
                            <Image x:Name="image" Margin="10,9,6.667,8" Source="/Images/colorball.png" Stretch="Fill"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="ButtonStyleRank" TargetType="Button">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="53*"/>
                                <ColumnDefinition Width="194*"/>
                            </Grid.ColumnDefinitions>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <ColorAnimation Duration="0" To="#FFFFDFA6" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                            <ColorAnimation Duration="0" To="#FFFF8B00" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                            <ColorAnimation Duration="0" To="#FF442A04" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To="0.3" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
                                            <DoubleAnimation Duration="0" To="0.3" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="image" d:IsOptimized="True"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="MouseOver"/>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="FocusStates">
                                    <VisualState x:Name="Focused"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Border x:Name="border" BorderBrush="White" BorderThickness="1" CornerRadius="10" Grid.ColumnSpan="2">
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FF68FF00" Offset="0.07"/>
                                        <GradientStop Color="#FF044421" Offset="1"/>
                                        <GradientStop Color="#FFDCFFDD"/>
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                            <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Grid.Column="1"/>
                            <Image x:Name="image" Margin="10,9,6.667,8" Source="/Images/openXlive.png" Stretch="Fill"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="ButtonStyleNewGame" TargetType="Button">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="53*"/>
                                <ColumnDefinition Width="194*"/>
                            </Grid.ColumnDefinitions>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <ColorAnimation Duration="0" To="#FFFFDFA6" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                            <ColorAnimation Duration="0" To="#FFFF8B00" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                            <ColorAnimation Duration="0" To="#FF442A04" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To="0.3" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
                                            <DoubleAnimation Duration="0" To="0.3" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="image" d:IsOptimized="True"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="MouseOver"/>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="FocusStates">
                                    <VisualState x:Name="Focused"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Border x:Name="border" BorderBrush="White" BorderThickness="1" CornerRadius="10" Grid.ColumnSpan="2">
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FF68FF00" Offset="0.07"/>
                                        <GradientStop Color="#FF044421" Offset="1"/>
                                        <GradientStop Color="#FFDCFFDD"/>
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                            <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Grid.Column="1"/>
                            <Image x:Name="image" Margin="10,9,6.667,8" Source="/Images/colorball.png" Stretch="Fill"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="ButtonStyleSoundOn" TargetType="Button">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid Background="#02FFFFFF">
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="Disabled"/>
                                    <VisualState x:Name="MouseOver"/>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="FocusStates">
                                    <VisualState x:Name="Focused"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Image Source="/Images/sound_off.png" Stretch="Fill"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="ButtonStyleSoundOff" TargetType="Button">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid Background="#02FFFFFF">
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="Disabled"/>
                                    <VisualState x:Name="MouseOver"/>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="FocusStates">
                                    <VisualState x:Name="Focused"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Image Source="/Images/sound_on.png" Stretch="Fill"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="ButtonStyle2" TargetType="Button">
        	<Setter Property="Template">
        		<Setter.Value>
        			<ControlTemplate TargetType="Button">
        				<Grid>
        					<VisualStateManager.VisualStateGroups>
        						<VisualStateGroup x:Name="CommonStates">
        							<VisualState x:Name="Pressed">
        								<Storyboard>
        									<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
        									<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
        									<DoubleAnimation Duration="0" To="1.05" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="border" d:IsOptimized="True"/>
        									<DoubleAnimation Duration="0" To="1.05" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
        									<DoubleAnimation Duration="0" To="1.05" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="border" d:IsOptimized="True"/>
        									<DoubleAnimation Duration="0" To="1.05" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
        								</Storyboard>
        							</VisualState>
        							<VisualState x:Name="Normal"/>
        							<VisualState x:Name="Disabled">
        								<Storyboard>
        									<DoubleAnimation Duration="0" To="0.3" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
        									<ColorAnimation Duration="0" To="#FF6C6C6C" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
        								</Storyboard>
        							</VisualState>
        							<VisualState x:Name="MouseOver"/>
        						</VisualStateGroup>
        						<VisualStateGroup x:Name="FocusStates">
        							<VisualState x:Name="Focused"/>
        						</VisualStateGroup>
        					</VisualStateManager.VisualStateGroups>
        					<Border x:Name="border" BorderBrush="#FF400000" BorderThickness="2" CornerRadius="7" RenderTransformOrigin="0.5,0.5">
        						<Border.RenderTransform>
        							<CompositeTransform/>
        						</Border.RenderTransform>
        						<Border.Background>
        							<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
        								<GradientStop Color="#FFF55858" Offset="0"/>
        								<GradientStop Color="#FF910606" Offset="1"/>
        								<GradientStop Color="#FF660900" Offset="0.168"/>
        							</LinearGradientBrush>
        						</Border.Background>
        					</Border>
        					<ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RenderTransformOrigin="0.5,0.5">
        						<ContentPresenter.RenderTransform>
        							<CompositeTransform/>
        						</ContentPresenter.RenderTransform>
        					</ContentPresenter>
        				</Grid>
        			</ControlTemplate>
        		</Setter.Value>
        	</Setter>
        </Style>
        <Style x:Key="ButtonStyle3" TargetType="Button">
        	<Setter Property="Template">
        		<Setter.Value>
        			<ControlTemplate TargetType="Button">
        				<Grid>
        					<Grid.ColumnDefinitions>
        						<ColumnDefinition Width="53*"/>
        						<ColumnDefinition Width="194*"/>
        					</Grid.ColumnDefinitions>
        					<VisualStateManager.VisualStateGroups>
        						<VisualStateGroup x:Name="CommonStates">
        							<VisualState x:Name="Pressed">
        								<Storyboard>
        									<ColorAnimation Duration="0" To="#FFFFDFA6" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
        									<ColorAnimation Duration="0" To="#FFFF8B00" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
        									<ColorAnimation Duration="0" To="#FF442A04" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
        								</Storyboard>
        							</VisualState>
        							<VisualState x:Name="Normal"/>
        							<VisualState x:Name="Disabled">
        								<Storyboard>
        									<DoubleAnimation Duration="0" To="0.3" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
        									<DoubleAnimation Duration="0" To="0.3" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="image" d:IsOptimized="True"/>
        								</Storyboard>
        							</VisualState>
        							<VisualState x:Name="MouseOver"/>
        						</VisualStateGroup>
        						<VisualStateGroup x:Name="FocusStates">
        							<VisualState x:Name="Focused"/>
        						</VisualStateGroup>
        					</VisualStateManager.VisualStateGroups>
        					<Border x:Name="border" BorderBrush="White" BorderThickness="1" CornerRadius="10" Grid.ColumnSpan="2">
        						<Border.Background>
        							<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
        								<GradientStop Color="Red" Offset="0.07"/>
        								<GradientStop Color="#FF440404" Offset="1"/>
        								<GradientStop Color="#FFFF8585"/>
        							</LinearGradientBrush>
        						</Border.Background>
        					</Border>
        					<ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Grid.Column="1"/>
        					<Image x:Name="image" Margin="10,9,6.667,8" Source="/Images/colorball.png" Stretch="Fill"/>
        				</Grid>
        			</ControlTemplate>
        		</Setter.Value>
        	</Setter>
        </Style>
        <Style x:Key="ButtonStyle4" TargetType="Button">
        	<Setter Property="Template">
        		<Setter.Value>
        			<ControlTemplate TargetType="Button">
        				<Grid>
        					<VisualStateManager.VisualStateGroups>
        						<VisualStateGroup x:Name="CommonStates">
        							<VisualState x:Name="Pressed">
        								<Storyboard>
        									<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
        									<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
        									<DoubleAnimation Duration="0" To="1.05" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="border" d:IsOptimized="True"/>
        									<DoubleAnimation Duration="0" To="1.05" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
        									<DoubleAnimation Duration="0" To="1.05" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="border" d:IsOptimized="True"/>
        									<DoubleAnimation Duration="0" To="1.05" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
        								</Storyboard>
        							</VisualState>
        							<VisualState x:Name="Normal"/>
        							<VisualState x:Name="Disabled">
        								<Storyboard>
        									<DoubleAnimation Duration="0" To="0.3" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
        									<ColorAnimation Duration="0" To="#FF6C6C6C" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
        								</Storyboard>
        							</VisualState>
        							<VisualState x:Name="MouseOver"/>
        						</VisualStateGroup>
        						<VisualStateGroup x:Name="FocusStates">
        							<VisualState x:Name="Focused"/>
        						</VisualStateGroup>
        					</VisualStateManager.VisualStateGroups>
        					<Border x:Name="border" BorderBrush="#FF400000" BorderThickness="2" HorizontalAlignment="Left" Height="51" VerticalAlignment="Top" Width="204" CornerRadius="7" RenderTransformOrigin="0.5,0.5">
        						<Border.RenderTransform>
        							<CompositeTransform/>
        						</Border.RenderTransform>
        						<Border.Background>
        							<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
        								<GradientStop Color="#FFF55858" Offset="0"/>
        								<GradientStop Color="#FF910606" Offset="1"/>
        								<GradientStop Color="#FF660900" Offset="0.168"/>
        							</LinearGradientBrush>
        						</Border.Background>
        					</Border>
        					<ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RenderTransformOrigin="0.5,0.5">
        						<ContentPresenter.RenderTransform>
        							<CompositeTransform/>
        						</ContentPresenter.RenderTransform>
        					</ContentPresenter>
        				</Grid>
        			</ControlTemplate>
        		</Setter.Value>
        	</Setter>
        </Style>
        <Style x:Key="ButtonStyleClose" TargetType="Button">
        	<Setter Property="Template">
        		<Setter.Value>
        			<ControlTemplate TargetType="Button">
        				<Grid x:Name="grid" RenderTransformOrigin="0.5,0.5">
        					<Grid.RenderTransform>
        						<CompositeTransform/>
        					</Grid.RenderTransform>
        					<VisualStateManager.VisualStateGroups>
        						<VisualStateGroup x:Name="CommonStates">
        							<VisualState x:Name="Pressed">
        								<Storyboard>
        									<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="grid" d:IsOptimized="True"/>
        									<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="grid" d:IsOptimized="True"/>
        									<DoubleAnimation Duration="0" To="1.05" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="grid" d:IsOptimized="True"/>
        									<DoubleAnimation Duration="0" To="1.05" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="grid" d:IsOptimized="True"/>
        								</Storyboard>
        							</VisualState>
        							<VisualState x:Name="Normal"/>
        							<VisualState x:Name="Disabled"/>
        							<VisualState x:Name="MouseOver"/>
        						</VisualStateGroup>
        						<VisualStateGroup x:Name="FocusStates">
        							<VisualState x:Name="Focused"/>
        						</VisualStateGroup>
        					</VisualStateManager.VisualStateGroups>
        					<Ellipse Width="37" VerticalAlignment="Top" Stroke="White" Height="37" HorizontalAlignment="Left" Fill="#FF890000"/>
        					<Path Width="20.254" VerticalAlignment="Center" UseLayoutRounding="False" StrokeThickness="5" Stroke="White" Stretch="Fill" Height="20.254" HorizontalAlignment="Center" Fill="#FF890000" Data="M265,10 L284.254,29.2542"/>
        					<Path Width="20.254" VerticalAlignment="Center" UseLayoutRounding="False" StrokeThickness="5" Stroke="White" Stretch="Fill" RenderTransformOrigin="0.5,0.5" Margin="8.373" Height="20.254" HorizontalAlignment="Center" Fill="#FF890000" Data="M265,10 L284.254,29.2542">
        						<Path.RenderTransform>
        							<CompositeTransform Rotation="90"/>
        						</Path.RenderTransform>
        					</Path>
        				</Grid>
        			</ControlTemplate>
        		</Setter.Value>
        	</Setter>
        </Style>
        <Storyboard x:Name="StoryboardShowPackage">
        	<DoubleAnimation Duration="0:0:0.4" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="bdrNewUser" d:IsOptimized="True"/>
        </Storyboard>
        <Storyboard x:Name="StoryboardHidePackage">
        	<DoubleAnimation Duration="0:0:0.4" To="-800" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="bdrNewUser" d:IsOptimized="True"/>
        </Storyboard>
    </phone:PhoneApplicationPage.Resources>

    <!--LayoutRoot 是包含所有页面内容的根网格-->
    <Viewbox>
        <Grid x:Name="LayoutRoot" Background="Transparent" Height="800" Width="480">
            <Image Source="/Images/mainpg.png" Stretch="Fill"/>
            <Image Margin="8,56,8,459" Source="/Images/mainPageTitle.png" Stretch="Fill" Width="464" Height="285"/>
            <Image x:Name="image" Margin="307,44,10,603" Source="/Images/mainPageBall1.png" Stretch="Fill" RenderTransformOrigin="0.5,0.5">
                <Image.RenderTransform>
                    <CompositeTransform/>
                </Image.RenderTransform>
            </Image>
            <Image x:Name="image1" Margin="10,251,364,439" Source="/Images/mainPageBall2.png" Stretch="Fill" RenderTransformOrigin="0.5,0.5">
                <Image.RenderTransform>
                    <CompositeTransform/>
                </Image.RenderTransform>
            </Image>
            <Image x:Name="image2" Margin="60,422,305,262" Source="/Images/mainPageBall3.png" Stretch="Fill" RenderTransformOrigin="0.5,0.5">
                <Image.RenderTransform>
                    <CompositeTransform/>
                </Image.RenderTransform>
            </Image>
            <Image x:Name="image3" Margin="10,610,323,42" Source="/Images/mainPageBall4.png" Stretch="Fill" RenderTransformOrigin="0.5,0.5">
                <Image.RenderTransform>
                    <CompositeTransform/>
                </Image.RenderTransform>
            </Image>
            <Image x:Name="image4" Margin="292,630,10,-10" Source="/Images/mainPageBall5.png" Stretch="Fill" RenderTransformOrigin="0.5,0.5">
                <Image.RenderTransform>
                    <CompositeTransform/>
                </Image.RenderTransform>
            </Image>
            <Image Margin="0,0,5,5" Source="/Images/logo77.png" Stretch="Fill" Width="91" Height="26" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
            <Border BorderBrush="#7FFFFFFF" BorderThickness="1" HorizontalAlignment="Left" Height="38" Margin="10,10,0,0" VerticalAlignment="Top" Width="357" Background="#33FFFFFF" CornerRadius="10">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="26*"/>
                        <ColumnDefinition Width="45*"/>
                    </Grid.ColumnDefinitions>
                    <Border BorderThickness="1" HorizontalAlignment="Left" Height="36" VerticalAlignment="Top" Width="131" CornerRadius="10,0,0,10" Grid.ColumnSpan="2">
                        <Border.Background>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#FF1B1B1B" Offset="0"/>
                                <GradientStop Color="Black" Offset="0.987"/>
                            </LinearGradientBrush>
                        </Border.Background>
                        <TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" Text="TOP SCORE" VerticalAlignment="Center" Foreground="White"/>
                    </Border>
                    <TextBlock x:Name="txtHighScore" Grid.Column="1" HorizontalAlignment="Center" TextWrapping="Wrap" Text="0" VerticalAlignment="Center" Foreground="#FFFFF300" FontSize="24" Margin="0"/>
                </Grid>
            </Border>
            <StackPanel Margin="208,343,25,97" Orientation="Vertical">
                <TextBlock x:Name="txtContinueInfo" HorizontalAlignment="Center" TextWrapping="Wrap" Text="STAGE-10" VerticalAlignment="Center" Margin="0,0,0,2" Foreground="#FFF3FF00" FontFamily="Segoe WP Semibold" FontSize="24"/>

                <Button x:Name="btnContinue" Click="btnContinue_Click_1" Content="CONTINUE" HorizontalAlignment="Left" Height="53" Style="{StaticResource ButtonStyle1}" VerticalAlignment="Top" Width="247" Foreground="White"/>
                <Button x:Name="btnNewGame" Content="NEW GAME" HorizontalAlignment="Left" Height="52" VerticalAlignment="Top" Width="247" Click="Button_Click_1" Style="{StaticResource ButtonStyleNewGame}" Margin="0,30,0,0" Foreground="White"/>
                <Button x:Name="btnOpenxlive" Click="btnOpenxlive_Click_1" Content="LEADERBOARD" HorizontalAlignment="Left" Height="53" Style="{StaticResource ButtonStyleRank}" VerticalAlignment="Top" Width="247" Margin="0,30,0,0" Foreground="White"/>
                <Button x:Name="btnGift" Click="btnGift_Click_1" Content="GIFT PACKAGE" Height="53" Background="White" Width="247" Style="{StaticResource ButtonStyle3}" BorderThickness="0" Margin="0,30,0,0"/>

            </StackPanel>
            <Button x:Name="btnSoundOff" Click="btnSoundOff_Click" Content="Button" Margin="414,6,18,746" Style="{StaticResource ButtonStyleSoundOff}" Visibility="Collapsed"/>
            <Button x:Name="btnSoundOn" Click="btnSoundOn_Click" Content="Button" Margin="414,6,18,746" Style="{StaticResource ButtonStyleSoundOn}"/>
            <Border x:Name="bdrNewUser" BorderBrush="Black" BorderThickness="1" Margin="0" Background="#CC000000" RenderTransformOrigin="0.5,0.5">
            	<Border.RenderTransform>
            		<CompositeTransform TranslateY="-800"/>
            	</Border.RenderTransform>
            	<Border BorderBrush="White" BorderThickness="1" HorizontalAlignment="Center" Height="358" VerticalAlignment="Center" Width="300" Background="#7FE8E8E8" CornerRadius="10">
            		<Grid>
            			<Image Source="/Images/colorball.png" Stretch="Fill" HorizontalAlignment="Center" Width="89" Height="89" VerticalAlignment="Top" Margin="67,10,142,0"/>
            			<TextBlock HorizontalAlignment="Center" Margin="0,114,0,0" TextWrapping="Wrap" Text="Rating game with 5 stars." VerticalAlignment="Top" Foreground="#FFFFE800" FontSize="24"/>
            			<TextBlock HorizontalAlignment="Center" Margin="0,162,0,0" TextWrapping="Wrap" Text="Get the free 30 magic balls." VerticalAlignment="Top" Foreground="#FFFFE800" FontSize="24"/>
            			<Button x:Name="btnGetMB" Click="btnGetMB_Click_1" Content="Get It!" HorizontalAlignment="Center" Margin="47,275,47,0" VerticalAlignment="Top" Style="{StaticResource ButtonStyle4}"/>
            			<Button x:Name="btnCloseGift" Click="btnCloseGift_Click_1" Content="Button" Margin="256,3,5,316" Style="{StaticResource ButtonStyleClose}"/>
            			<TextBlock HorizontalAlignment="Left" Margin="161,35,0,0" TextWrapping="Wrap" Text="×30" VerticalAlignment="Top" FontSize="48" Foreground="White"/>
            		</Grid>
            	</Border>
            </Border>

        </Grid>

    </Viewbox>

</phone:PhoneApplicationPage>